package team.tunan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import team.tunan.entity.Matches;
import team.tunan.entity.dto.MatchInfo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sqx
 * @since 2024-01-01
 */
public interface IMatchesService extends IService<Matches> {
    /**
     * 判断上一轮是否结束
     * @param matches
     * @return
     */
    boolean isEnd(Matches matches);

    int doAdd(Matches matches);


    List<Map<String,Object>> getMatchInfo(Integer gid, Integer roundNum);

    // 获取歌手信息
    List<Map<String,Object>> getPlayerInfo(Integer gid);

    // 大屏显示信息
    MatchInfo getMatchToShow(Integer mid);

    boolean getMatchVerify();


    Matches getMatch(Integer mid);
    // 开启比赛
    Map<String,Object> startMatches(Matches matches);

    // 关闭比赛
    Map<String,Object>  endMatches(Integer mid);


    Map<String, Object> updateMatch(Matches matches);

    Integer maxRoundNum(Integer gid);


}
